package com.android.baselibs.constract;


import com.android.baselibs.network.HttpType;
import com.lzy.okgo.model.HttpHeaders;

import java.util.Map;


/**
 * Created by zouqh on 2018/4/2.
 */

public interface RealtConstract {
    interface View  {
        void returnData(String data, int urlCode);
        void LoadError(String errorMsg, int urlCode);
    }

    interface Presenter  {
        void loadData(Map<String, String> map, String msg, String url, int urlCode);
        void loadData(String json, String msg, String url, int urlCode);
        void loadDataHeader(Map<String, String> map, String msg, String url, int urlCode, HttpHeaders headers,HttpType httpType);
        void loadDataGetHeader(Map<String, String> map, String msg, String url, int urlCode, HttpHeaders headers);

    }

    interface Model {
        void loadDataKey(String url, Map<String, String> map, OnLoadFirstDataListener listener, int urlCode);
        void loadDataJson(String url, String json, OnLoadFirstDataListener listener, int urlCode);
        void loadDataKeyHeader(String url, Map<String, String> map, OnLoadFirstDataListener listener, int urlCode,HttpHeaders headers,HttpType httpType);
        void loadDataKeyGet(String url, Map<String, String> map, OnLoadFirstDataListener listener, int urlCode,HttpHeaders headers);

    }
    interface OnLoadFirstDataListener{
        void  onSuccess(String data, int urlCode);
        void  onFailure(String str, int urlCode,Exception e);
    }
}
